export const types = [
  { text: "一键长草", value: "LinkStart" },
  { text: "一键长草-基建换班", value: "LinkStart-Base" },
  { text: "一键长草-开始唤醒", value: "LinkStart-WakeUp" },
  { text: "一键长草-自动刷图", value: "LinkStart-Combat" },
  { text: "一键长草-自动公招", value: "LinkStart-Recruiting" },
  { text: "一键长草-信用商店", value: "LinkStart-Mall" },
  { text: "一键长草-日常任务", value: "LinkStart-Mission" },
  { text: "一键长草-自动肉鸽", value: "LinkStart-AutoRoguelike" },
  { text: "一键长草-生息演算", value: "LinkStart-ReclamationAlgorithm" },
  // { text: 'LinkStart', value: 'Settings' },
  // { text: 'LinkStart', value: 'Settings-ConnectionAddress' },
  // { text: 'LinkStart', value: 'Settings-Stage1' },
  { text: "截图", value: "CaptureImage" },
  { text: "立刻截图", value: "CaptureImageNow" },
  { text: "结束当前任务", value: "StopTask" },
  // { text: "心跳任务", value: "HeartBeat" },
];

export const typeFormatter = (value: string) => {
  return types.find((el) => el.value === value)?.text;
};

const status = { 1: "待执行", 2: "执行中", 3: "已完成", 4: "失败" };
type Status = 1 | 2 | 3 | 4;

export const statusFormatter = (value: any) => {
  return status[value as Status];
};
